package com.demo.annotation_c_other;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Service("userServiceId")
//@Scope("prototype")
public class UserServiceImpl implements UserService {
    
    public void addUser() {
        System.out.println("static_factory create");
    }
    
    @PostConstruct
    public void myInit(){
        System.out.println("------初始化------");
    }
    
    @PreDestroy
    public void myDestroy(){
        System.out.println("------销毁------");
    }
}
